<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;


class BannerModel extends BaseModel
{
    public $table = 'article_banner';

    public $timestamps = false;
    public $primaryKey = 'id';

    public static function GetPageList(int $count, $where = [])
    {
        return self::where($where)->orderBy('sort', 'asc')->paginate($count);
    }




    /**
     * @func根据id删除数据
     * @param $id
     * @return mixed
     */
    public static function DelById(int $id)
    {
        //return self::where('id',$id)->delete();
        return self::where('Id', $id)->update(['IsDel' => 1]);
    }


}
